rgb

open fun rgb(red: Float, green: Float, blue: Float): Color

Creates a new Color instance from the passed RGB values with opacity (alpha) channel set to 1 (non-transparent).

Return

a new Color instance

Parameters

red

the red channel value in the 0..1 range

green

the green channel value in the 0..1 range

blue

the blue channel value in the 0..1 range

Throws

if any of the passed values is out of the 0..1 range